<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>用户修改</title> 
<link href="/dadaocms/Public/ui/css/main.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="/dadaocms/Public/ui/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/dadaocms/Public/ui/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/dadaocms/Public/ui/js/jquery.form.js"></script>
<style type="text/css">html,body {overflow-y:scroll}</style> 
<script type="text/javascript">
		$(function(){
			/*$('#form1').ajaxForm({
				beforeSubmit: checkForm ,
				success:	complete ,
				dataType:	'json'
			});*/
		     function checkForm(){
            	if( '' == $.trim($('#title').val())){
	                $('#result').html('标题不能为空').show();
	                return false;
            	}
            	}
           
           function complete(data){
            if (data.status==1){
                $('#result').html(data.info).show();
                // 更新列表
                data = data.data;
                //var html =  ' <ul id="d3"> <li class="w300" title="">'+data.title+' </li> <li><a href="javascript:editdoctor('+data.id+')">编辑</a> | <a href="javascript:edit('+data.id+')">删除</a></li> </ul> ' ;
                var html =  ' <ul id="d3"> <li class="w300" title="">'+data.title+' </li> </ul> ' ;
                $('#dep').append(html);
            }else{
                $('#result').html(data.info).show();
            }
        }
		});
		
		$(function(){
			$('#form2').ajaxForm({
				success: editok ,
				dataType: 'json'
			});
			function editok(data){
				if (data.status == 1){
					//alert("修改成功");
					window.location.reload();
				}else{
					alert(data.info);
				}
			}
		});
	  function checkTitle(){
           		$.post('/visit/Entity/checkTitle',{'title':$('#title').val()},function(data){
			            if (data.status ==1) {
			           $('#result').html(data.info).show();
			           //alert('数据重复');
           			 }
        			},'json'); 
    } 
      function editdoctor(id){
      		$('#adddiv').hide();
           		$.post('/visit/Entity/loadedit',{'id':id},function(data){
			            if (data.status ==1) {
			          		$('#editdiv').show();
			          		$('#id').val(data.data.id);
			          		$('#title2').val(data.data.title);
			          		//alert(data.data.title);
			           
           			 }else{
           			 	 $('#result').html(data.info).show();
           			 }
        			},'json'); 
    } 
      function deletedoctor(id){
      		if (confirm("你确定要删除吗？") == true ){
      		
      		$.post('/visit/Entity/delete',{'id':id},function(data){
			            if (data.status ==1) {
			           //$('#result').html(data.info).show();
			            //alert('成功删除数据');
			            window.location.reload(); 
           			 }else{
           			 	alert('删除失败');
           			 }
        			},'json'); 
        	}else{
        		return false;
        	}
      }
$(function(){
	var doctoradvice = $('#doctoradvice').val();
	$('#doctoradvice').click(function(){
		if($(this).val()==doctoradvice){
			$('#doctoradvice').val('');								  
		}
	});	

});      
</script>
<script>
 function refreshParent() {
  window.opener.location.href = window.opener.location.href;
  window.close();  
 }              
</script>
<script type="text/javascript">   
<!--     
    window.onbeforeunload = onbeforeunload_handler;
    window.onunload = onunload_handler;   
    function onbeforeunload_handler(){ 
		window.opener.location.href = window.opener.location.href;     
    }   
       
    function onunload_handler(){ 
		window.opener.location.href = window.opener.location.href;    
    }   
// -->   
</script>   
</head> 

<body> 
<div style="height:15px;"></div>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" style="background-color:#ECF4FD; border:1px #BED7E8 solid;">
    <tr>
      <td height="25" colspan="2">&nbsp;</td>
    </tr>
  </table>
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head2" style="display:none">
    <tr>
      <td colspan="2"> <table height="24" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="84" align="center" background="/Public/ywt/itemnote2.gif"><a href="#" onClick="ShowItem1()"><u>常规信息</u></a>&nbsp;</td>
            <td width="84" align="center" background="/Public/ywt/itemnote1.gif">高级参数</td>
          </tr>
        </table></td>
    </tr>
  </table>
<form name="form1" id="form1" action="" enctype="multipart/form-data" method="post">
<input type="hidden" name="id" value="{$list.id}" />
  <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset" style="background-color:#ECF4FD; border:1px #BED7E8 solid;">
    <tr>
      <td width="10%" height="24" bgcolor="#FFFFFF" class="bline">联 系 人：</td>
      <td width="90%" bgcolor="#FFFFFF" class="bline">{$list.name}</td>
    </tr>
    <tr>
      <td width="10%" height="24" bgcolor="#FFFFFF" class="bline">联系手机：</td>
      <td width="90%" bgcolor="#FFFFFF" class="bline">{$list.phone}</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">联系地址：</td>
      <td bgcolor="#FFFFFF">{$list.dizhi}</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">联系邮箱：</td>
      <td bgcolor="#FFFFFF">{$list.email}</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">留言时间：</td>
      <td bgcolor="#FFFFFF">{$list.pubdate}</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">备注：</td>
      <td bgcolor="#FFFFFF">{$list.content}</td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF">审核</td>
      <td bgcolor="#FFFFFF"><span class="bline">
        <input name="status" type="radio" id="radio" value="1" <if condition="$list['status']">checked="checked"</if> />
        审核    
        &nbsp; 
         <input type="radio" name="status" id="radio2" value="0" <if condition="empty($list['status'])">checked="checked"</if>/>
        <label for="status"></label>
      未审核</span></td>
    </tr>
  </table>
  <!-- //高级参数 -->
  

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9FCEF" style="background-color:#ECF4FD; border:1px #BED7E8 solid;border-top:none;">
  <tr>
    <td height="35">
	<table width="100%" border="0" cellspacing="1" cellpadding="1">
        <tr>
          <td><table width="214" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="115"><input type="submit" name="button" id="button" value="提交" /></td>
                <td width="99">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</form>
</body> 
</html>